// K&R book. p34.

#include <stdio.h>
#include <ctype.h> // Use function tolower().

char lower(char c);

int main()
{
    char c = 'B';

    printf("lower is %c\n", lower(c));

    printf("tolower is %c\n", tolower(c));

    return 0;
}

char lower(char c)
{
    int gap;

    gap = 'A' - 'a';

    if (c >= 'A' && c <= 'Z')
        c = c - gap;

    return c;
}